:root {
    --bs-primary: #193A18;
    --bs-primary-rgb: 25, 58, 24;
    --bs-dark: #137D0F;
    --bs-light: #F5F9F0;
    --bs-body: #2C3E2C;
    --bs-secondary: #77797D;
    --bs-accent: #CEC66D;
    --bs-white: #FFFFFF;
    --bs-gray: #4B3402;
    --bs-muted: #84A65C;
    --bs-soft-green: #D9E798;
    --bs-deep-green: #000800;
    --bs-olive: #E8D433;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--bs-body);
    background: var(--bs-light);
    overflow-x: hidden;
    margin: 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.portal-layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   STANDALONE SIDEBAR BUTTONS (No Icons)
   ============================================================ */
.sidebar-menu-rail {
    width: 260px;
    flex-shrink: 0;
    padding: 2rem 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 900;
    background: transparent;
}
.sidebar-menu-rail::-webkit-scrollbar { width: 4px; }
.sidebar-menu-rail::-webkit-scrollbar-thumb {
    background: rgba(25,58,24,0.15);
    border-radius: 4px;
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: left; /* Centered text since there are no icons */
    padding: 0.85rem 1.2rem;
    border-radius: 8px;
    background: var(--bs-muted);
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: none;
    cursor: pointer;
    text-align: center;
}

.menu-btn:hover {
    background: var(--bs-primary);
    color: var(--bs-accent);
    transform: translateX(4px);
    box-shadow: 0 6px 18px rgba(25,58,24,0.25);
}

.menu-btn.active {
    background: var(--bs-dark);
    color: #fff;
    box-shadow: 0 6px 20px rgba(19,125,15,0.4);
    transform: translateX(4px);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 2.5rem 3rem;
}

/* --- CENTERED HERO BANNER & BREADCRUMB --- */
.content-hero {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(25,58,24,0.15);
}

.content-hero .bg-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: top center;
    transform: scale(1.02);
    transition: transform 1.2s ease;
    z-index: 1;
}

.content-hero:hover .bg-img { transform: scale(1.08); }

/* Dark overlay to make text readable */
.content-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(25, 58, 24, 0.75); 
    z-index: 2;
}

.content-hero .hero-inner {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    padding: 2rem;
}

.content-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* --- BREADCRUMB STYLE --- */
.breadcrumb-custom {
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.breadcrumb-custom .home-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-custom .home-link:hover {
    color: var(--bs-accent);
}

.breadcrumb-custom .separator {
    color: #fff;
    opacity: 0.8;
    margin: 0 0.2rem;
}

.breadcrumb-custom .current-page {
    color: #45c467; 
    font-weight: 500;
}

/* --- CONTENT CARD --- */
.content-card {
    background: #fff;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 10px 36px rgba(25,58,24,0.08);
    border: 1px solid rgba(25,58,24,0.05);
    animation: fadeUp 0.6s ease;
}
.content-card p { line-height: 1.75; margin-bottom: 1rem; }
.content-card a { color: var(--bs-dark); font-weight: 600; text-decoration: none; }
.content-card a:hover { color: var(--bs-accent); }
.content-card ul { padding-left: 1.2rem; }
.content-card ul li { padding: 0.3rem 0; line-height: 1.6; }
.content-card ul li::marker { color: var(--bs-dark); font-weight: 700; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    border: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}
.sidebar-toggle:hover { background: var(--bs-accent); color: var(--bs-primary); }

@media (max-width: 991.98px) {
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .sidebar-menu-rail {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        background: var(--bs-light);
        box-shadow: 4px 0 20px rgba(0,0,0,0.1);
        transform: translateX(-100%);
        transition: transform 0.35s ease;
    }
    .sidebar-menu-rail.open { transform: translateX(0); }
    .main-content { padding: 5rem 1.25rem 2rem; }
    .content-hero { min-height: 250px; }
    .content-hero h1 { font-size: 2.5rem; }
    .content-card { padding: 1.4rem; }
}

/* ============================================================
   REUSABLE PAGE CONTENT STYLES
   ============================================================ */

/* Standard Paragraph Text (Used in Overview & History) */
.gov-text {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--bs-body);
}

/* Highlighted Paragraph with Left Border (Used in History) */
.gov-text-bordered {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    color: var(--bs-body);
    padding-left: 1rem;
    /* border-left: 3px solid var(--bs-soft-green); */
}

/* Text Highlighting Utilities (Used across all pages) */
.text-key {
    color: var(--bs-dark);
    font-weight: 700;
}

.text-primary-bold {
    color: var(--bs-primary);
    font-weight: 700;
}

.text-highlight {
    color: var(--bs-gray);
    font-weight: 700;
    background: rgba(206, 198, 109, 0.2);
    padding: 0 4px;
    border-radius: 3px;
}

.text-italic {
    color: var(--bs-dark);
    font-style: italic;
}

/* Card Layouts (Used in Townships) */
.gov-card-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.gov-card {
    background: #f0f3ee;
    border-right: 6px solid var(--bs-primary);
    border-radius: 8px 0 0 8px;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(25, 58, 24, 0.04);
}

/* Card Border Color Variations */
.gov-card.border-dark { border-right-color: var(--bs-dark); }
.gov-card.border-accent { border-right-color: var(--bs-accent); }
.gov-card.border-muted { border-right-color: var(--bs-muted); }

/* Card Header Layout */
.gov-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.gov-card-header i {
    color: var(--bs-primary);
    font-size: 1.2rem;
}

.gov-card.border-dark .gov-card-header i { color: var(--bs-dark); }
.gov-card.border-accent .gov-card-header i { color: var(--bs-gray); }

/* Card Title */
.gov-card-title {
    margin: 0;
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 1.15rem;
}

.gov-card.border-dark .gov-card-title { color: var(--bs-dark); }

/* Section Headers (Used in Townships) */
.gov-section-header {
    color: var(--bs-primary);
    font-weight: 800;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--bs-soft-green);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ============================================================
   REUSABLE DATA TABLE
   ============================================================ */

/* Table Container (uses your soft text box style) */
.gov-table-wrapper {
    background: #fff;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
    border-left: 4px solid var(--bs-muted);
    box-shadow: 0 2px 10px rgba(25, 58, 24, 0.04);
}

/* Base Table Layout */
.gov-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

/* Header */
.gov-table-header th {
    background: var(--bs-dark);
    color: #fff;
    text-align: left;
    padding: 1rem 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--bs-dark);
}

.gov-table-header th:last-child {
    text-align: right;
}

/* Rows */
.gov-table tbody tr {
    border-bottom: 1px solid rgba(25, 58, 24, 0.05);
}

/* Alternate Row Colors (Stripes) */
.gov-table tbody tr:nth-child(even) {
    background: var(--bs-light);
}

/* Last row shouldn't have a bottom border */
.gov-table tbody tr:last-child {
    border-bottom: none;
}

/* Cells */
.gov-table td {
    padding: 0.85rem 1.5rem;
    color: var(--bs-body);
}

.gov-table td:last-child {
    text-align: right;
}


/* ============================================================
   INFRASTRUCTURE PAGE LAYOUT (Horizontal Text + Right Images)
   ============================================================ */

/* Container for each category */
.infra-category {
    margin-bottom: 2rem;
}

/* Headers */
.infra-category-title {
    color: var(--bs-primary);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--bs-soft-green);
    padding-bottom: 0.5rem;
}

/* Horizontal Layout Row */
.infra-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* On desktop, text left, images right */
@media (min-width: 768px) {
    .infra-row {
        flex-direction: row;
        align-items: stretch;
    }
    .infra-text-box {
        flex: 1;
    }
    .infra-images-right {
        flex-shrink: 0;
        width: 300px; /* Fixed width for images on the right */
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Soft-Colored Text Boxes */
.infra-text-box {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    /* border-left: 4px solid var(--bs-muted); */
    box-shadow: 0 2px 10px rgba(25, 58, 24, 0.04);
    font-size: 1rem;
    line-height: 1.8;
}

/* Variations for text box background colors */
.infra-text-box.soft-green { background: var(--bs-light); border-left-color: var(--bs-primary); }
.infra-text-box.soft-gold { background: rgba(206, 198, 109, 0.1); border-left-color: var(--bs-accent); }
.infra-text-box.soft-muted { background: rgba(132, 166, 92, 0.08); border-left-color: var(--bs-dark); }

/* Image Styling on the Right */
.infra-images-right img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(25, 58, 24, 0.08);
}

/* Multi-column lists for long data */
.infra-multi-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    list-style-type: decimal;
    font-size: 0.95rem;
    color: var(--bs-secondary);
}

.infra-sub-list {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--bs-secondary);
    line-height: 1.7;
}

/* Text Highlights */
.text-key { color: var(--bs-dark); font-weight: 700; }
.text-highlight {
    color: var(--bs-gray);
    font-weight: 700;
    background: rgba(206, 198, 109, 0.2);
    padding: 0 4px;
    border-radius: 3px;
}

/* ============================================================
   COMPACT KEY STATISTICS GRID (Soft Shaded Backgrounds)
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-card {
    border: none; /* Removed borders */
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(25, 58, 24, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Alternating Soft Background Colors */
.stat-card:nth-child(odd) {
    background-color: var(--bs-light);
}

.stat-card:nth-child(even) {
    background-color: #edf3ed;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(25, 58, 24, 0.08);
}

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--bs-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--bs-dark); /* Using dark green for better readability on soft backgrounds */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Extra CSS to make the data grid table fit nicely */
.data-table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* ============================================================
   TOGGLE MENU BUTTONS
   ============================================================ */
.sub-menu-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    /* border-bottom: 2px solid var(--bs-soft-green); */
    padding-bottom: 1rem;
}

.sub-menu-btn {
    background: var(--bs-light);
    color: var(--bs-primary);
    border: 1px solid rgba(25, 58, 24, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sub-menu-btn:hover {
    background: var(--bs-soft-green);
}

.sub-menu-btn.active {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

/* ============================================================
   HERITAGE GALLERY (Images below text)
   ============================================================ */
.heritage-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.heritage-gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top center; /* This shows the top part of the image */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(25, 58, 24, 0.08);
    transition: transform 0.3s ease;
}

.heritage-gallery img:hover {
    transform: scale(1.03);
}

/* ============================================================
   CULTURE PAGE LAYOUT
   ============================================================ */

/* Top Row: Text Left, Full Image Right */
.culture-top-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .culture-top-row {
        flex-direction: row;
        align-items: stretch;
    }
    .culture-top-row .infra-text-box {
        flex: 1;
    }
    .culture-top-row .culture-main-img {
        flex-shrink: 0;
        width: 100%;
        height: 100%;
        min-height: 250px;
        object-fit: cover;
        object-position: top center;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(25, 58, 24, 0.08);
    }
}

/* Bottom Row: Two Half-Height Images */
.culture-bottom-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.culture-bottom-images img {
    width: 100%;
    height: 180px; /* Half the height of the main image */
    object-fit: cover;
    object-position: top center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(25, 58, 24, 0.08);
    transition: transform 0.3s ease;
}

.culture-bottom-images img:hover {
    transform: scale(1.02);
}